<?php 
$page_assocation="visuals.php";
$page_title="Starfield";
include("header.php");
$width =296;
$height = 196;
$pixel = 1;
?>
<center><canvas id="canvas" width="<?php echo $width * $pixel; ?>" height="<?php echo $height * $pixel; ?>"></canvas></center>
<center><div id="error"></div></center>
<script language="javascript" type="text/javascript">

VisualsStop();

var zo;
var r1, r2, r3;
width = <?php echo $width; ?>;
height = <?php echo $height; ?>;
pixel = <?php echo $pixel; ?>;
drawMode = 0;
clearFrame = true;
needs_init = true;
redraw = false;

function init() {n = 50; zo = 0; }

function frame() {r1=1/7;r2=4/9;r3=5/3;var date = new Date();zo=date.getTime()*.001;}

function beat() {}

function point() {r1=r2*9333.2312311+r3*33222.93329; r1=r1-Math.floor(r1);r2=r3*6233.73553+r1*9423.1323219; r2=r2-Math.floor(r2);r3=r1*373.871324+r2*43322.4323441; r3=r3-Math.floor(r3);z1=r3-zo;z1=.5/(z1-Math.floor(z1)+.2);x=(r2*2-1)*z1;y=(r1*2-1)*z1;red=(1-Math.exp(-z1*z1)) * 255; green=red; blue=red;}

var scope = new r_sscope("StarField", init, frame, beat, point);

scope.addvar("zo", 1);
scope.addvar("r1", 1);
scope.addvar("r2", 1);
scope.addvar("r3", 1);
scope.addvar("count", 0);

AddLink(scope);


VisualsStart();
</script>
<?php
include("footer.php"); 
?>
